import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path:'/',
      redirect:'home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/home/index.vue')
    },
    {
      path: '/favor',
      name: 'favor',
      // route level code-splitting
      // this generates a separate chunk (favtor.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('@/views/favor/index.vue')
    },
    {
      path: '/order',
      name: 'order',
      component: () => import('@/views/order/index.vue')
    },
    {
      path: '/message',
      name: 'message',
      component: () => import('@/views/message/index.vue')
    },
    {
      path: '/city',
      name: 'city',
      component: () => import('@/views/city/index.vue'),
      meta:{
        hiddenTabbar:true
      }
    },
  ]
})

export default router
